Dynomotion

Group: DynoMotion Message: 12150 From: cnc_machines Date: 8/25/2015
Subject: Polarity and Pulse Length
Tom,

I have a KStep to run my stepper motors, and a third party servo driver for my spindle. I am able to get the servo to drive very well with encoder feedback on the step response screens. The problem arises when I try to make my .INT program to run both the servo and the KStep.

There is a line in the KStep example program that when it is included the servo driver stops working. Here it is, and I am not exactly sure what it is doing.

FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80;  // set polarity and pulse length to 4us

When I comment this out the servo seems to work just fine, and the KStep also seems to work. Am I okay in simply removing this?

Thanks,

Scott


Group: DynoMotion Message: 12163 From: Tom Kerekes Date: 8/26/2015
Subject: Re: Polarity and Pulse Length
Hi Scott,

That FPGA command is changing the default pulse length from ~2us to 3.8us and inverting the pulse polarity.  It is explained here:


Seems strange that the drive would not work at all with a longer inverted pulse.  What type of drives is it?  How is it wired?  How is the Spindle Axis configured?

Regards
TK

Group: DynoMotion Message: 12300 From: cnc_machines Date: 9/23/2015
Subject: Re: Polarity and Pulse Length
Tom,

I ended up just removing the line of code (FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80;  // set polarity and pulse length to 4us) because everything seems to work okay... or maybe not. I am now getting following errors from my steppers driven from the KStep.

Could it be that the KStep is not happy with the default 2us pulse width setting? If this shouldn't matter I will keep trying to track down my following errors elsewhere.

Here is the servo I am using for the spindle. I am using step and direction and wired it according to open collector mode. Seems to work very well until that line of code is put into the program.

PRONET-E Servo System

 

Group: DynoMotion Message: 12302 From: Tom Kerekes Date: 9/23/2015
Subject: Re: Polarity and Pulse Length
KSTEP needs that line of code to work reliably.

The open collector mode shows a 2K ohm pull up and a relatively slow 200KHz max rate so it may be fast enough to see 4us pulses of a certain polarity.

Wiring using the differential inputs might work in some configuration (maybe Grounding the - input and driving the + in TTL mode)

But better yet I believe your drive says it will accept:

    "90°phase difference 2-phase (phase A + phase B)"

This should be what we call Quadrature mode.  I'd suggest using that as it eliminates all pulse and direction timing issues.

Regards
TK